import pypinyin
namelist=['张广勤','张正康','董炎焱0']
namelistpy=[]

def hzzpy(nlist):
    for name in namelist:
        #result1=pypinyin.pinyin(name,style=pypinyin.NORMAL,errors='ignore')
        result1 = pypinyin.pinyin(name, style=pypinyin.NORMAL)
        #print(result1)
        result_=[i[0] for i in result1]
        print(result_)
        result3=result_[0].capitalize()+''.join(result_[1:]).capitalize()
        #print(result3)
        namelistpy.append(result3)

    print(namelistpy)

hzzpy(namelist)
